package nl.Viewer.ViewManager.Controllers;

import nl.Viewer.SerializedObjects.DataObject;
import nl.Viewer.SerializedObjects.Modality;
import nl.Viewer.SerializedObjects.Visualization;
import nl.Viewer.Sessions.ClientSideSession;
import nl.Viewer.ViewManager.Models.DataStores.ZoomifyDataStore;
import nl.Viewer.ViewManager.Views.JOGLImageDataObjectAsImageView;
import nl.Viewer.ViewManager.Views.JOGLImageOrientationView;
import nl.Viewer.ViewManager.Views.ParameterView.DefaultParameterView;

/**
 * The implementation of the controller which is used to display images, supporting panning, zooming, etc, all on the
 * client side. No new renders are requested from the server. The datastore is a Zoomify data store, supporting images
 * to be built up from Zoomify tiles
 * 
 * @see GenericController
 * 
 * @author Jeroen Verschuur
 * 
 */

public class ZoomifyImageAsImageController extends GenericController {
   /**
    * 
    */
   private static final long serialVersionUID = -2935450713881817671L;

   public ZoomifyImageAsImageController( Visualization v, Modality modality, ClientSideSession session,
         String outputType ) {
      super( v, modality, session, outputType );

      // set the renderer (and button bar if needed)
      this.visualizationRenderer = new JOGLImageDataObjectAsImageView( this );
      this.orientationView = new JOGLImageOrientationView( this );
      this.parameterView = new DefaultParameterView( this, new String[] {} );

      super.initializeComponents();
   }

   public void createNewDataStore( DataObject dataObject ) {
      dataModel.createNewDataStore( new ZoomifyDataStore( dataObject ) );
   }

}
